package com.example.coffeejava.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.coffeejava.Dto.Result;
import com.example.coffeejava.Entity.Cart;
import com.example.coffeejava.Entity.UserHolder;
import com.example.coffeejava.Mapper.CartMapper;
import com.example.coffeejava.Service.CartService;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CartServiceImpl extends ServiceImpl<CartMapper, Cart> implements CartService {
   @Resource
   private CartMapper cartMapper;
    public Result getlist(){

        List<Cart> list=cartMapper.getlist(UserHolder.getUser().getId());
        return Result.ok(list);
    }
}
